Daniel Maldini became the third generation of his family to score for AC Milan.
The Stefano Pioli’s side beat Spezia in Serie A.
The 19-year-old, son of Paolo Maldini and grandson of Cesare Maldini, headed the visitors in front three minutes into the second half.
Daniele Verde drew the hosts level with ten minutes remaining.
But Brahim Diaz clinched the win for Milan six minutes later with a close-range finish.
Maldini’s goal came 13 years 179 days after the last league goal of his father Paolo.
It came 60 years 22 days after the last Serie A goal of his grandfather Cesare.
The win puts Milan top of the table, one point clear of Napoli, who can replace the Rossoneri in first place if they avoid defeat at home to Cagliari on Sunday.